<?php
include("include/haut.php");

if(!isConnected()){
	header("Location: index.php");
	exit();
}
$projet = getProjets();
?>

<div id="corps">
	<h1>Projets</h1>
	<div id="centre">
		<a href="new_projet.php">Nouveau projet</a><br />
		<table style="width: 100%">
			<tr>
				<th>Projet</th>
				<th>Description</th>
				<th>Action</th>
			</tr>
			<?php
			if($projet == null){
				echo "Aucun projets trouvés";
			}else{
				while($a= mysql_fetch_array($projet)) {
					?>
					<tr>
					<td><?php echo $a['titre']; ?></td>
					<td><?php echo $a['descr']; ?></td>

					<td><a href="showprojet.php?id=<?php echo $a['id']; ?>">Voir</a></td>
				</tr>
					<?php
				}
			}
				?>
			</table>
	</div>
</div>
</div>
<?php
include("include/bas.php");
?>
